home *** CD-ROM | disk | FTP | other *** search
-
-
-
- eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL)))) XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))
-
-
-
- NNNNaaaammmmeeee
- exp - process an expenses file.
-
- DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
- eeeexxxxpppp processes an expenses file. The expenses file consists
- of records describing expenses which were payed for by
- certain parties and which are owed for by some other set of
- parties. eeeexxxxpppp uses information on who payed for each expense
- and who the parties to the expense were to calculate, for
- each party, a net amount of money owed by or to a
- coordinator. For simplicity, all balances are calculated
- relative to the coordinator. A net amount owed by a party
- is shown as a positive amount owed by that party to the
- coordinator; a net amount owed to a party is shown as a
- negative amount owed by that party to the coordinator.
- After the file has been processed, the amounts owed are
- printed. The only users reported on are those who are
- currently in the AAAAllllllll set (see below) and those who have an
- outstanding balance whose absolute value is greater than or
- equal to the minimum report balance, by default $0.02. This
- can be changed with the -M option.
-
- SSSSyyyynnnnttttaaaaxxxx
- exp [-bchlrRtTV] [-p<party,...>] [-P<payment-types>]
- [-M<min-amt>] [-s<start-date>] [-e<end-date>]
- [expenses-file ...]
-
- If no expenses-file is given, the default filename eeeexxxxppppeeeennnnsssseeeessss
- is used. It is expected to be found in the directory
- ////llllooooccccaaaallll////lllliiiibbbb////hhhhoooouuuusssseeee. If the environment variable HHHHOOOOUUUUSSSSEEEELLLLIIIIBBBB is
- set, it is used instead of ////llllooooccccaaaallll////lllliiiibbbb////hhhhoooouuuusssseeee.
-
- OOOOppppttttiiiioooonnnnssss
- ----bbbb Print totals in a brief format, suitable for processing
- by another utility.
-
- ----cccc Generate carryover output, suitable for starting a new
- expenses file.
-
- ----hhhh Print help information.
-
- ----llll Print the date of the last payment by each party in the
- last AAAAllllllll group defined. A payment is a negative cost
- owed by a single party to the coordinator.
-
- ----rrrr Print a running display of lines from the expenses file
- as they are processed.
-
- ----tttt Like -r, but prints only as many lines as will fit on
- the screen (the last lines processed), and truncates
- them to the screen width.
-
-
-
-
- Page 1 (printed 10/8/95)
-
-
-
-
-
-
- eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL)))) XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))
-
-
-
- ----RRRR,,,, ----TTTT
- Like -r and -t, except that nonzero amounts owed by each
- party are printed after each record is processed.
-
- ----ssss<<<<ssssttttaaaarrrrtttt----ddddaaaatttteeee>>>>
- Process only records with a date equal to or later than
- <start-date>. <start-date> should be given in the form
- yy/mm/dd.
-
- ----eeee<<<<eeeennnndddd----ddddaaaatttteeee>>>>
- Process only records with a date equal to or earlier
- than <end-date>. <end-date> should be given in the form
- yy/mm/dd.
-
- ----pppp<<<<ppppaaaarrrrttttyyyy,,,,............>>>>
- Process expenses only for the parties given in the
- comma-separated list.
-
- ----PPPP<<<<ppppaaaayyyymmmmeeeennnntttt----ttttyyyyppppeeee>>>>
- Process only records that match one of the comma-
- separated types in <payment-type>. Payment types
- consist of one character from _b_t and/or one from _p_n. _b
- and _t select records which include any of the parties
- given with -p in the owed-by or owed-to field
- respectively; they should only be used if -p is given.
- If a party is in both the owed-by and owed-to fields, _b
- will select the record if the party represents a larger
- fraction of the owed-by field than the owed-to field,
- while _t will do the opposite of this. If the party
- represents the same fraction of both fields, it is not
- selected in either case. _p and _n select records which
- have a positive or negative amount respectively. If
- both a character from _b_t and a character from _p_n are
- given in one payment type (e.g. _b_p), both of the
- conditions specified must be true for a record to match
- that payment-type specifier. If more than one payment-
- type is given (e.g. _b,_t_n), a record will be selected if
- it matches any of the payment types. A payment type of
- _P is short for _b_p,_t_n which selects records that specify
- a net positive amount owed by one of the -p parties; _N
- is short for the opposite of this.
-
- ----MMMM<<<<mmmmiiiinnnn----aaaammmmtttt>>>>
- Set the minimum report balance to <min-amount>, given in
- dollars (a decimal fraction can be use to give cents).
-
- ----VVVV Verbose report; print details of transfer directions,
- averages, etc. At the end of file processing, a report
- is generated for every party encountered, including the
- coordinator and those no longer part of AAAAllllllll. This may
- be limited by giving a party list with the -p option.
- For each party, the amount of time that the party was
-
-
-
- Page 2 (printed 10/8/95)
-
-
-
-
-
-
- eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL)))) XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))
-
-
-
- part of the expense system is printed, in various units
- (days, weeks, months, and years). This is derived from
- the assignments to AAAAllllllll, so every AAAAllllllll assignment must
- have a date in order for this option to be used. This
- is followed by a breakdown of expenses that the party
- was party to, by expense type. For each expense type,
- the total amount is printed, along with the average by
- day, week, month, and year. The expense types are the
- same as those described for the -P option, and
- conglomerations of them. The expense types are:
-
- oooowwwweeeedddd----bbbbyyyy,,,, oooowwwweeeedddd----ttttoooo
- Expenses in which the party represented a larger
- fraction of the owed-by field than the owed-to
- field, and vice versa.
-
- nnnneeeeggggaaaattttiiiivvvveeee,,,, ppppoooossssiiiittttiiiivvvveeee
- Expenses in which the cost was a negative value and
- those in which the cost was a positive value.
-
- oooowwwweeeedddd----bbbbyyyy////oooowwwweeeedddd----ttttoooo nnnneeeeggggaaaattttiiiivvvveeee////ppppoooossssiiiittttiiiivvvveeee
- Expenses in which both of the named conditions were
- true.
-
- ddddeeeebbbbiiiittttssss,,,, ccccrrrreeeeddddiiiittttssss
- Expenses which resulted in a net debit to the party
- (both owed-by positive and owed-to negative types),
- and which resulted in a net credit to the party
- (both owed-by negative and owed-to positive types).
-
- FFFFiiiilllleeee ffffoooorrrrmmmmaaaatttt
- Input files consist of single-line records with one of the
- two following formats:
-
- DDDDAAAATTTTEEEE<sep>CCCCOOOOSSSSTTTT<sep>PPPPAAAARRRRTTTTIIIIEEEESSSS<sep>[PPPPUUUURRRRCCCCHHHHAAAASSSSEEEERRRRSSSS]<sep>DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- or
- [date<sep>]vvvvaaaarrrr=vvvvaaaalllluuuueeee
-
- DDDDAAAATTTTEEEE is used only for the ----llll and ----VVVV options. If one of them
- is going to be used, dates should be given in the form
- yyyyeeeeaaaarrrr/mmmmoooonnnntttthhhh/ddddaaaayyyy or mmmmoooonnnntttthhhh/ddddaaaayyyy. If the latter form is used, a
- value must be assigned to variable YYYYeeeeaaaarrrr (see below). CCCCOOOOSSSSTTTT
- is a decimal value giving dollars and cents, with no leading
- $ symbol. PPPPAAAARRRRTTTTIIIIEEEESSSS is a list of parties to the expense,
- separated by commas. It may also specify that some parties
- are to be subtracted, e.g. AAAAllllllll----FFFFoooooooo is a list of parties that
- includes those in the alias AAAAllllllll (see below) except for FFFFoooooooo.
- PPPPUUUURRRRCCCCHHHHAAAASSSSEEEERRRRSSSS has the same format as PPPPAAAARRRRTTTTIIIIEEEESSSS and lists those
- who payed for the expense. If any of the purchasers are
- also parties to to expense (as they usually are), they
- should also be included in PPPPAAAARRRRTTTTIIIIEEEESSSS. If a record has only
- four fields, PPPPUUUURRRRCCCCHHHHAAAASSSSEEEERRRRSSSS is set to be the coordinator. If a
-
-
-
- Page 3 (printed 10/8/95)
-
-
-
-
-
-
- eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL)))) XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))
-
-
-
- party payed for or owes for more than one share of an
- expense, that party may be listed more than once in PPPPAAAARRRRTTTTIIIIEEEESSSS
- or PPPPUUUURRRRCCCCHHHHAAAASSSSEEEERRRRSSSS. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN is a description of the expense;
- it is not used. The default field separator <sep> is one or
- more tabs or spaces, except that the separator immediately
- before the comment field must be a tab so that spaces in the
- comment won't cause the first word of the comment field to
- be interpreted as the optional PPPPUUUURRRRCCCCHHHHAAAASSSSEEEERRRRSSSS field (by default,
- only the comment field can contain spaces). If the field
- separator is changed, none of this special behaviour
- applies.
-
- Lines of the form vvvvaaaarrrr=vvvvaaaalllluuuueeee assign values to variables.
- Variable assignments may be preceded by a date. This can
- make it easier to sort the file. However, the date of an
- assignment is used only for assignments to the AAAAllllllll variable
- (see below). The value of the variable YYYYeeeeaaaarrrr is used for
- lines that do not include a year in the date. YYYYeeeeaaaarrrr need not
- be assigned a value if all dates include a year or if the ----pppp
- and ----VVVV options will not be used. The variable SSSSeeeepppp can be
- used to define a field separator. It should be a regular
- expression in the manner of aaaawwwwkkkk. For example, to make the
- field separator be one or more tabs, use
- Sep=\t+
- If the variable OwedBy is set, expenses lines should not
- included a PARTIES field. All expenses will be charged to
- the party specified by the OwedBy variable. If the variable
- OwedTo is set, expenses lines should not included a
- PURCHASERS field, and the separator before the comment field
- need not be a tab. All expenses will be charged to the
- party specified by the OwedTo variable. Any other variable
- assignments define aliases which may be used whereever
- parties are. The value part should have the form:
- name,name,name... Aliases may reference other aliases but
- there must not be any loops. Aliases may be redefined
- throughout the file. Aliases that are defined before any
- expense records are printed before the column header is
- printed.
-
- The special alias AAAAllllllll must be set before any expense records
- occur. Any names that occur either directly or in other
- aliases must exist in AAAAllllllll; it determines what names are
- valid. The first name on the right hand side of the first
- definition of AAAAllllllll is that of the coordinator, with respect
- to whom all balances are calculated. All names are case-
- insensitive. The first instance of a name determines the
- case with which it is printed. Assigments to AAAAllllllll should
- generally include a date, because the ----VVVV (verbose) option
- uses the period in which each party was a member of AAAAllllllll to
- determine the amount of time that the party was part of the
- expenses system, so that averages by time may be calculated.
- If any AAAAllllllll assignment does not include a date, the ----VVVV option
-
-
-
- Page 4 (printed 10/8/95)
-
-
-
-
-
-
- eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL)))) XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))
-
-
-
- will abort.
-
- Lines that begin with #### are comments and are ignored, as are
- blank (empty) lines.
-
- EEEExxxxaaaammmmpppplllleeee
- 92/01/01 All=John,Bela,Irene,MikeTh,Dan
- Paper=John,Bela,Irene
- 92/01/01 271.31 Bela Carryover
- 92/01/01 109.34 MikeTh Carryover
- 92/01/20 56.07 Paper Sentinel (26 weeks)
- 92/01/12 6.01 John,Bela,Irene Bela Groceries
- 92/01/13 6.00 Irene Bela Safeway
- 92/01/18 1.00 All Paper towels
- 92/01/24 -247.70 Irene Payment for expenses
- 92/01/24 0.95 All-Irene,John Toilet paper
- 92/02/01 -150.00 Bela Payment for expenses
- 92/02/01 42.29 John,Bela,Irene Bela Groceries
-
- AAAAuuuutttthhhhoooorrrr
- John DuBois <john@armory.com>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 5 (printed 10/8/95)
-
-
-
-